﻿using Tools;

namespace Entity.Package
{
    /// <summary>
    /// 缴费请求包
    /// </summary>   
    public class PackRequestPayment
    {
        //通用结构
        private PackHead packHead;
        public PackHead PackHead
        {
            get { return packHead; }
            set { packHead = value; }
        }

        private string tradeCode;  //交易码
        public string TradeCode
        {
            get { return tradeCode; }
            set { tradeCode = value; }
        }
        private string gasUserID;  //用户编号
        public string GasUserID
        {
            get { return gasUserID; }
            set { gasUserID = value; }
        }
        private string payMoney;   //交费金额
        public string PayMoney
        {
            get { return payMoney; }
            set { payMoney = value; }
        }
        private string yjhj;       //应交总额
        public string Yjhj
        {
            get { return yjhj; }
            set { yjhj = value; }
        }
        private string payDate;    //缴费时间
        public string PayDate
        {
            get { return payDate; }
            set { payDate = value; }
        }
        private string operatorNumber;  //操作工号
        public string OperatorNumber
        {
            get { return operatorNumber; }
            set { operatorNumber = value; }
        }
        private string payMonth;  //缴费月份 固定值：000000
        public string PayMonth
        {
            get { return payMonth; }
            set { payMonth = value; }
        }
        private string isPrintFP;   //燃气表类型：0：机表；1：卡表
        public string IsPrintFP
        {
            get { return isPrintFP; }
            set { isPrintFP = value; }
        }
        private string billNumber;  //发票号码：空值
        public string BillNumber
        {
            get { return billNumber; }
            set { billNumber = value; }
        }


        public PackRequestPayment()
        { }

        public override string ToString()
        {
            string strBody = tradeCode.ToString() + "|" + gasUserID.ToString() + "|" + payMoney.ToString() + "|" +
                          yjhj.ToString() + "|" + payDate.ToString() + "|" + operatorNumber.ToString() + "|" +
                          payMonth.ToString() + "|" + isPrintFP.ToString() + "|" + billNumber.ToString();
            if (packHead == null)
                return strBody;
            else
                return packHead.ToString() + MD5Helper.UserMd5(strBody) + strBody;

        }
    }
}
